Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make test failure source locations lazy #12260

Merged
merged 85 commits into from
Mar 7, 2025
Merged

Conversation

GregoryTravis
Copy link
Contributor

@GregoryTravis GregoryTravis commented Feb 11, 2025

Replaces eager calls to Test.get_source_location to lazy calls to Frame_Hider.get_top_stack_frame, resulting in a 2x speedup for Base_Tests.

Test utilities wrap their contents in Frame_Hider.hide, and wrap callbacks in Frame_Hider.unhide. These marker frames are used to skip test utility frames to find the real user-level location of the test failure.

The frames_to_skip parameter is no longer needed, since the number of frames to skip is computed dynamically on test failure.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.
  • If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

@GregoryTravis GregoryTravis added CI: Ready to merge This PR is eligible for automatic merge CI: Clean build required CI runners will be cleaned before and after this PR is built. labels Feb 19, 2025
@github-actions github-actions bot added the -libs-API-change-Test Marks a PR that changes the public API of Standard.Test label Feb 28, 2025
@jdunkerley jdunkerley added the CI: Keep up to date Automatically update this PR to the latest develop. label Mar 7, 2025
@jdunkerley jdunkerley removed the CI: Keep up to date Automatically update this PR to the latest develop. label Mar 7, 2025
@mergify mergify bot merged commit 3888ec5 into develop Mar 7, 2025
64 of 67 checks passed
@mergify mergify bot deleted the wip/gmt/12215-slow-stack-frame branch March 7, 2025 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-libs-API-change-Test Marks a PR that changes the public API of Standard.Test CI: Clean build required CI runners will be cleaned before and after this PR is built. CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants